package controllers

import play.api._
import play.api.mvc._
import anorm._
import play.api.Play.current

object Ext extends Controller {
  def vi(): String = {
    var ret: String = ""
    val env: String = Play.current.configuration.getString("application.env").get
    val rev: String = Play.current.configuration.getString("application.revision").get
    
    if (env.equals("dev"))   
      ret = "?id=" + java.util.UUID.randomUUID().toString() + "&rev=" + rev
  
    if (env.equals("test"))
      ret = "?id=T&rev=" + rev

    if (env.equals("prod"))
      ret = "?id=P&rev=" + rev

    ret
  }
}

